package com.icim.xmtm005.dao;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.icim.xmtm005.entity.CtSlimifRetBox005;

@Repository
public class CtSlimifRetBox005Dao {
    @Resource
    private JdbcTemplate xmtm005JdbcTemplate;

    public void save(CtSlimifRetBox005 box) {
//        String sql = "INSERT INTO CT_SLIMIFRETBOX (vendorcode,productspecname,thickness,targetproductspecname,"
        String sql = "INSERT INTO V_XM_G5_SLIMIFRETBOX_WG (vendorcode,productspecname,thickness,targetproductspecname,"
                + "targetthickness,producttype,productnumber,boxname,boxtype,boxquantity,slotmap,"
                + "integrationlevel,receiveflag,releaseflag,deliverytime,boxrealid,destination) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";

        xmtm005JdbcTemplate.update(sql, new Object[] { box.getVendorcode(), box.getProductspecname(), box.getThickness(),
                box.getTargetproductspecname(), box.getTargetthickness(), box.getProducttype(), box.getProductnumber(),
                box.getBoxname(), box.getBoxtype(), box.getBoxquantity(), box.getSlotmap(), box.getIntegrationlevel(),
                box.getReceiveflag(), box.getReleaseflag(), box.getDeliverytime(),box.getBoxrealid(),box.getDestination()});
    }
}
